package com.catering.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.catering.pojo.DDishes;
import com.catering.service.DDishesService;
import com.catering.mapper.DDishesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
* @author 徐
* @description 针对表【d_dishes】的数据库操作Service实现
* @createDate 2025-04-03 14:05:59
*/
@Service
public class DDishesServiceImpl extends ServiceImpl<DDishesMapper, DDishes>
    implements DDishesService{
    @Autowired
    private DDishesMapper dDishesMapper;

    @Override
    public List<DDishes> selectByDishes() {
        List<DDishes> dDishes = dDishesMapper.selectByDishes();
        return dDishes;
    }

    @Override
    public List<DDishes> searchDishes(String name, BigDecimal minPrice, BigDecimal maxPrice) {
        List<DDishes> dDishes = dDishesMapper.searchDishes(name, minPrice, maxPrice);
        return dDishes;
    }

    @Override
    public List<DDishes> selectByDish_Categories() {
        List<DDishes> dDishes = dDishesMapper.selectByDish_Categories();
        return dDishes;
    }
}




